package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.AssignmentOjProblemsMapper;
import com.ruoyi.system.domain.AssignmentOjProblems;
import com.ruoyi.system.service.IAssignmentOjProblemsService;

/**
 * 实验与OJ题目的关联Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-25
 */
@Service
public class AssignmentOjProblemsServiceImpl implements IAssignmentOjProblemsService 
{
    @Autowired
    private AssignmentOjProblemsMapper assignmentOjProblemsMapper;

    /**
     * 查询实验与OJ题目的关联
     * 
     * @param id 实验与OJ题目的关联主键
     * @return 实验与OJ题目的关联
     */
    @Override
    public AssignmentOjProblems selectAssignmentOjProblemsById(Long id)
    {
        return assignmentOjProblemsMapper.selectAssignmentOjProblemsById(id);
    }

    /**
     * 查询实验与OJ题目的关联列表
     * 
     * @param assignmentOjProblems 实验与OJ题目的关联
     * @return 实验与OJ题目的关联
     */
    @Override
    public List<AssignmentOjProblems> selectAssignmentOjProblemsList(AssignmentOjProblems assignmentOjProblems)
    {
        return assignmentOjProblemsMapper.selectAssignmentOjProblemsList(assignmentOjProblems);
    }

    /**
     * 新增实验与OJ题目的关联
     * 
     * @param assignmentOjProblems 实验与OJ题目的关联
     * @return 结果
     */
    @Override
    public int insertAssignmentOjProblems(AssignmentOjProblems assignmentOjProblems)
    {
        return assignmentOjProblemsMapper.insertAssignmentOjProblems(assignmentOjProblems);
    }

    /**
     * 修改实验与OJ题目的关联
     * 
     * @param assignmentOjProblems 实验与OJ题目的关联
     * @return 结果
     */
    @Override
    public int updateAssignmentOjProblems(AssignmentOjProblems assignmentOjProblems)
    {
        return assignmentOjProblemsMapper.updateAssignmentOjProblems(assignmentOjProblems);
    }

    /**
     * 批量删除实验与OJ题目的关联
     * 
     * @param ids 需要删除的实验与OJ题目的关联主键
     * @return 结果
     */
    @Override
    public int deleteAssignmentOjProblemsByIds(Long[] ids)
    {
        return assignmentOjProblemsMapper.deleteAssignmentOjProblemsByIds(ids);
    }

    /**
     * 删除实验与OJ题目的关联信息
     * 
     * @param id 实验与OJ题目的关联主键
     * @return 结果
     */
    @Override
    public int deleteAssignmentOjProblemsById(Long id)
    {
        return assignmentOjProblemsMapper.deleteAssignmentOjProblemsById(id);
    }
}
